//
//  RightViewController.m
//  练习
//
//  Created by xalo on 16/7/7.
//  Copyright © 2016年 蓝鸥科技有限公司西安分公司. All rights reserved.
//

#import "RightViewController.h"

@interface RightViewController ()

@end

@implementation RightViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithTitle:@"菜单" style:UIBarButtonItemStylePlain target:self action:@selector(itemAction)];
}

- (void)itemAction{
    if (!self.isSlider) {
        [UIView animateWithDuration:0.2 animations:^{
            self.navigationController.view.frame=CGRectMake(kWidth/2, 0, kWidth, kHeight);
        }];
    }else{
        [UIView animateWithDuration:0.2 animations:^{
            self.navigationController.view.frame=self.navigationController.view.bounds;
        }];
    }
    self.isSlider=!self.isSlider;
}







- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
